package com.qys.wallet.pay.hyperbc;


import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
@ConfigurationProperties(prefix = "hyperbc")
@Data
public class HyperbcConfig {
    /**
     * 项目名称
     */
    private String app_id;
    /**
     * 版本号
     */
    private String version;
    /**
     * 请求网关
     */
    private String gateway;
    /**
     * 业务私钥
     */
    private String priKey;
    /**
     * 业务公钥
     */
    private String pubKey;

    /**
     * 风控公钥
     */
    private String rePubKey;

    /**
     * 风控私钥
     */
    private String rePriKey;

    public Map<String, Object> initParams(Map<String, Object> params) {
        params.put("app_id", app_id);
        params.put("version", version);
        params.put("time", Long.toString(System.currentTimeMillis() / 1000));
        return params;
    }

}
